package model;

import java.util.Vector;

import javax.swing.table.DefaultTableModel;

public class MyTableModel extends DefaultTableModel {
	private static final long serialVersionUID = 4919966220134736633L;

	public MyTableModel(Vector<?> data, Vector<?> columnnames) {
		super(data, columnnames);
	}

	@Override
	public boolean isCellEditable(int row, int column) {
		return (column != 1 || row == 0) ? false : true;
	}

	@Override
	public Class<?> getColumnClass(int columnIndex) {
		if (getValueAt(0, columnIndex) != null)
			return getValueAt(0, columnIndex).getClass();
		return String.class;
	}

}
